cmake_minimum_required(VERSION 2.8.7 FATAL_ERROR)
project(uart)
enable_language(C CXX)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CROSS_COMPILER_TOOLS /usr/local/arm/arm-2009q3/bin/)
set(CMAKE_C_COMPILER ${CROSS_COMPILER_TOOLS}/arm-none-linux-gnueabi-gcc)
set(CMAKE_CXX_COMPILER ${CROSS_COMPILER_TOOLS}/arm-none-linux-gnueabi-gcc++)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/build/bin/debug)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/build/bin/release)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/build/lib/debug)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/build/lib/release)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build/lib)
#set(CMAKE_BUILD_TYPE Release)
set(CMAKE_C_FLAGS "-pthread")
include_directories(${PROJECT_SOURCE_DIR}/include)
set(src_list
		src/main.c
		src/uart_manager.c
		src/simple_transimit_receiver.c
		)
add_executable(uart_tool ${src_list})
